Tomáš Pospíšek's Notizblock
Every now and then I get something useful on the web in table format and would like to extract one column out of that data.
What can I do?
One possibility is to use a GUI HTML editor.
The only HTML editors I found running under Linux are:
BlueGriffon. Unfortunately allthough this seems to be a very well done and quite feature complete programm, it also seems to be only 80% done and there's a lot of stuff that doesn't work well.
Deleting columns in tables doesn't.
It seems that Daniel Glazman stopped working on BlueGriffon in 2013. What a pitty for such a nice programm.
Seamonkey which seems to work well. Take care when installing the package the official builds are 32bit, so not installable without further work on default modern Debian systems which are 64 bit.
Another possibility is to edit the table from the JavaScript console:
first retrieve all the tables in the document:
tables = document.getElementsByTagName('table');
to select a specific table:
tbl = tables[3];
show the selected table:
tbl;
if you click on the result in the console then the respective table should be highlighted
to prepare for deleting the column, highlight it first:
column_no = 3; for ( r=0; r < tbl.rows.length; r++) { tbl.rows[r].cells[column_no].style.background="red"; }
if it's the right column, then you can now delete it:
for ( r=0; r < tbl.rows.length; r++) { tbl.rows[r].deleteCell(column_no); }
Tomáš Pospíšek, 2015-10-08